var sliderItems = document.getElementsByClassName('list--item__slide');
var originX = 0;
var currentX = 0;
var distance = 0;
var expandedItem = null;
sliderItems[0].ontouchstart = function (e) {
    originX = e.changedTouches[0].clientX + (expandedItem === this ?  70 : 0);
    currentX = e.changedTouches[0].clientX;
};
sliderItems[0].ontouchmove = function (e) {
    currentX = e.changedTouches[0].clientX;
    distance = currentX - originX;
    if(distance < 0){
        if(distance < -70){
            this.style.left = -70 + (distance + 70) * (-70 / (distance * 2.5)) + 'px';
        }else{
            this.style.left = distance + 'px';
        }
    }

};
sliderItems[0].ontouchend = function (e) {
    if(distance > -35){
        this.style.left = '0';
        this.style.transition = 'left .3s ease-in';
    }
    if(distance <= -35){
        this.style.left = -70 + 'px';
        this.style.transition = 'left .3s ease-out';
        expandedItem = this;
    }
    this.addEventListener('transitionend', function () {
        this.style.transition = '';
    })
};